package cn.samehope.pet.web;

import java.util.HashMap;
import java.util.Map;

import com.jfinal.core.Controller;
import com.jfinal.kit.HttpKit;
import com.jfinal.kit.LogKit;
import com.jfinal.kit.PropKit;

public class MapController extends Controller{
	
	public void index(){
		Map<String, String> map = new HashMap<String, String>();
		map.put("location", getPara("location"));
		map.put("get_poi", "0");
		map.put("key", PropKit.use("db.properties").get("mapKey"));
		String result = HttpKit.get("https://apis.map.qq.com/ws/geocoder/v1/", map);
		LogKit.info(result);
		renderJson(result);
	}
}
